package com.googlecode.afx.view;

import javafx.scene.Node;

/**
 * Callback interface for handling nodes during JavaFX scene graph traversal.
 * 
 * @author MartinKoster
 *
 */
public interface NodeHandler {

	/**
	 * Method for processing a <code>Node</code> during scene graph traversal.
	 * 
	 * @param node
	 * @return true, if the scene graph traversal shall be continued, false, if it shall be stopped.
	 */
	public void process(Node node);

	/**
	 * Implementations must return <tt>true</tt>, if traversing the scene graph shall be continued. If <tt>false</tt> is
	 * returned, traversing will be stopped.
	 * 
	 * @return
	 */
	default public boolean continueTraversing() { return true; }
}
